home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Kara Collection
/
Kara Collection v3.0 (1996-09-12)(Cloanto).iso
/
utilities
/
h
/
0
/
6
/
2
/
rexx
/
reversedirection.ctrx
< prev
next >
Wrap
Text File
|
1996-08-28
|
1KB
|
71 lines
/* ColorType Amiga Rexx script - Copyright © 1996 Cloanto Italia srl */
/* $VER: ReverseDirection.ctrx 1.0 */
/**
This script changes the spacing and kerning information of all characters
in the font, so that the resulting font is suitable for right-to-left
rather than left-to-right typing, or vice versa. This is equivalent to the
"Reverse Direction" menu item of the Personal Fonts Maker 2 software.
This function is especially useful in combination with the "Flip Font"
command, which it complements (Reverse Direction changes the spacing and
kerning information, whereas Flip Font "flips" the character images).
*/
IF ARG(1, EXISTS) THEN
PARSE ARG CTPORT
ELSE
CTPORT = 'COLORTYPE'
IF ~SHOW('P', CTPORT) THEN DO
IF EXISTS('ColorType:ColorType') THEN DO
ADDRESS COMMAND 'Run >NIL: ColorType:ColorType'
DO 30 WHILE ~SHOW('P',CTPORT)
ADDRESS COMMAND 'Wait >NIL: 1 SEC'
END
END
ELSE DO
SAY "ColorType could not be loaded."
EXIT 10
END
END
IF ~SHOW('P', CTPORT) THEN DO
SAY 'ColorType Rexx port could not be opened.'
EXIT 10
END
ADDRESS VALUE CTPORT
OPTIONS RESULTS
OPTIONS FAILAT 10000
LockGUI
GetChar
scnum = RESULT
SetChar FIRSTON
IF RC = 0 THEN DO
Get 'DVIEW'
dvstatus = RESULT
Set '"DVIEW=0"'
DO FOREVER
GetSpace
space = RESULT
GetKern
kern = RESULT
SetSpace (-kern)
SetKern (-space)
SetChar NEXTON
IF RC ~= 0 THEN
LEAVE
END
SetAttr 'CHANGE 0x4000'
Set '"DVIEW='dvstatus'"'
SetChar scnum
END
UnlockGUI